Skip to content

Conversation

@jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Jun 21, 2022

Description

Update credit prices, calculation, and Stripe product IDs.

Related Issue(s)

Fixes #

How to test

  1. Trigger a custom Werft build (using the config from this PR)
    • E.g. like so: kubectx dev then werft job run github -j .werft/build.yaml
  2. Once built, in the preview, create a team called "Gitpod" (or any team name containing the word "Gitpod")
  3. Go to Team Settings > Team Billing
  4. Wait for the Usage-Based UI to show up
  5. Subscribe to Usage-Based Billing by entering a credit card (e.g. 4242 4242 4242 4242, 4/24, 424)
  6. Wait for the Stripe subscription to be created
  7. Once you can, click on "Manage Billing"
    • Your subscription should be linked to a product called Gitpod Usage (with latest prices)
  8. Start a workspace
  9. Wait for one hour (or manually trigger a usage report*)
  10. Go to the Stripe dashboard > Customers > (your created test customer) > click on the Subscription
  11. The "Upcoming invoice" should show some credits (with the first 50 credits being free)

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview
  • /werft with-payment

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Jun 22, 2022

/werft run

👍 started the job as gitpod-build-jx-update-credits.6
(with .werft/ from main)

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Jun 22, 2022

Manual build as per test instructions: https://werft.gitpod-dev.com/job/gitpod-custom-jx-update-credits.0

@jankeromnes jankeromnes marked this pull request as ready for review June 22, 2022 14:38
@jankeromnes jankeromnes requested a review from a team June 22, 2022 14:38
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jun 22, 2022
@jankeromnes
Copy link
Contributor Author

Manual build as per test instructions: https://werft.gitpod-dev.com/job/gitpod-custom-jx-update-credits.1

@easyCZ
Copy link
Member

easyCZ commented Jun 22, 2022

LGTM, haven't executed the steps in the PR but will take a look in the evening.

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Jun 22, 2022

Going through the manual test steps worked as intended! 🎉 Proof:

Step 7

Screenshot 2022-06-22 at 17 27 06

Step 11

Screenshot 2022-06-22 at 17 44 00

Double-checking the credits math

  • I ran 5 workspaces for just over 9 minutes each ≈ just a bit over 45 minutes of total usage
  • The latest usage report had:
[{"team_id":"4becf0d4-5a12-430c-89cf-96c5549b8aec","workspace_seconds":2813}]
  • 2813 seconds / 60 ≈ 46.88 minutes
  • 46.88 minutes / 6 ≈ 7.8 credits
  • rounds up to 8 credits 🎉

@roboquat roboquat merged commit df32c3b into main Jun 23, 2022
@roboquat roboquat deleted the jx/update-credits branch June 23, 2022 07:12
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/S team: webapp Issue belongs to the WebApp team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants